﻿
	<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit"/>
    <title><?php echo config('systemName'); ?></title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="shortcut icon" href="__STATIC__/img/favicon.ico" />
    <link rel="stylesheet" href="__STATIC__/plugs/awesome/css/font-awesome.min.css?ver={:date('ymd')}">
    <link rel="stylesheet" href="__STATIC__/plugs/bootstrap/css/bootstrap.min.css?ver={:date('ymd')}"/>
    <link rel="stylesheet" href="__STATIC__/plugs/layui/css/layui.css?ver={:date('ymd')}"/>
    <link rel="stylesheet" href="__STATIC__/theme/default/css/console.css?ver={:date('ymd')}">
    <link rel="stylesheet" href="__STATIC__/theme/default/css/animate.css?ver={:date('ymd')}">
    <link rel="stylesheet" href="__STATIC__/css/style.css?v=2017040201" media="all"/>
    <link rel="stylesheet" href="__STATIC__/css/tokenfield-typeahead.min.css?ver={:date('ymd')}" media="all"/>
    <link rel="stylesheet" href="__STATIC__/css/bootstrap-tokenfield.min.css?ver={:date('ymd')}" media="all"/>

    {block name="style"}{/block}

    <!--jquery-->
    <script src="/static/js/jquery-3.3.1.min.js"></script>

    <script src="__STATIC__/plugs/require/require.js?ver={:date('ymd')}"></script>
    <script src="__STATIC__/admin/app.js?ver={:date('ymd')}"></script>
    <script src="__STATIC__/js/main.js?ver={:date('ymd')}"></script>

    <script>window.ROOT_URL='__PUBLIC__';</script>


    <script src="__STATIC__/js/tabs.js?ver={:date('ymd')}"></script>

    <style>
        .iframes{
            width: 100%;
            height: calc(100% - 45px);
        }
        .iframes iframe{
            border: none;
            width: 100%;
            height: 100%;
        }
        .console-topbar {
            background: url(/static/img/title.jfif) no-repeat right top !important;
            background-size: cover;
        }
        .left_bg {
            background: url(/static/img/left_bg.jpg) no-repeat left top;
            background-size: cover;
        }
        .framework-sidebar .sidebar-nav li.active a {
            background: #0d93f2 !important;
           /* border-left: 3px solid red;
            background: #ffffff !important;
            color: #0d93f2;*/
        }

        .system_name{
            line-height:40px;
            margin-top:5px;
            margin-left:40px;
            font-size:20px;
            color:white;
            font-weight: bold
        }

        ::-webkit-scrollbar {
            display: none!important;
        }

    </style>
</head>
{block name="bodyTag"}
<body>

<div class="framework-topbar">
    <div class="console-topbar">
        <div class="topbar-wrap topbar-clearfix">
            <div class="topbar-head topbar-left">
                <a href="/admin.html" class=" topbar-left">
                    <!-- <img src="/static/img/logo2.png" /> -->
                    <div  class="system_name"><?php echo config('systemName') ?></div>
                </a>
            </div>
            <!--<span style="font-size:24px;color:white;height:50px;line-height:48px;margin-left: 25px;">新蓝领云人事</span>-->
            <div style="color:#fff; font-size:18px;height:50px;line-height:50px; margin-left:20px; width:500px;float:left; display: none"><?php echo config('system_name'); ?></div>

            <div class="topbar-info topbar-right">
                <a data-reload data-tips-text='刷新' style='width:50px'
                   class=" topbar-btn topbar-left topbar-info-item text-center">
                    <span class='glyphicon glyphicon-refresh'></span>
                </a>
                <div class="topbar-left topbar-user">
                    <div class="dropdown topbar-info-item">
                        <a href="#" class="dropdown-toggle topbar-btn text-center" data-toggle="dropdown">
                            <span class='glyphicon glyphicon-user'></span> {$user['name']} </span>
                            <span class="glyphicon glyphicon-menu-up transition" style="font-size:12px"></span>
                        </a>
                        <ul class="dropdown-menu"><!--
                            <li class="topbar-info-btn">
                                <a data-modal="/admin/index/edit">
                                    <span><i class='glyphicon glyphicon-edit'></i> 修改资料</span>
                                </a>
                            </li>-->
                            <li class="topbar-info-btn edit_index_user">
                                <a href="#">
                                    <span><i class='glyphicon glyphicon-edit'></i> 修改资料</span>
                                </a>
                            </li>
                            <li class="topbar-info-btn">
                                <a data-load="/bus/index/logout" data-confirm='确定要退出登录吗？'>
                                    <span><i class="glyphicon glyphicon-log-out"></i> 退出登录</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="framework-body framework-sidebar-full">

    <div class="framework-sidebar left_bg">
        <div class="sidebar-content">
            <div class="sidebar-inner">
                <div class="sidebar-fold">
                    <span class="glyphicon glyphicon-option-vertical transition"></span>
                </div>
                <div data-menu-box="m">

                    {foreach $data as $key=>$vo }
                    {if $vo.pid == 0 }

                    <div class="sidebar-nav main-nav">
                        <div class="sidebar-title">
                            <div class="sidebar-title-inner">
                                <span class="sidebar-title-icon fa fa-caret-right transition"></span>
                                <span class="sidebar-title-text">{$vo.title}</span>
                            </div>
                        </div>
                        <ul class="sidebar-trans" style="display: none;" data-menu-node="m-{$vo.id}">
                            {foreach $data as $key=>$vol }
                            {if $vol.pid == $vo.id }
                            <li class="nav-item active0">
                                <a data-id="m-{$vol.id}" data-open="{$vol.url}" class="sidebar-trans" data-url="{$vol.url}">
                                    <div class="nav-icon sidebar-trans">
                                        <span class="{$vol.ico} transition"></span>
                                    </div>
                                    <span class="nav-title">{$vol.title}</span>
                                </a>
                            </li>
                            {/if}
                            {/foreach}
                        </ul>
                    </div>

                    {/if}
                    {/foreach}

                </div>
            </div>
        </div>
    </div>
    <div class="framework-container">

        <div class="row content-tabs">
            <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
            </button>
            <nav class="page-tabs J_menuTabs">
                <div class="page-tabs-content">
                    <a href="javascript:;" class="active J_menuTab" data-id="if100">首页</a>
                </div>
            </nav>
            <button class="roll-nav roll-right J_tabRight" style="right: 80px"><i class="fa fa-forward"></i>
            </button>
            <div class="btn-group roll-nav roll-right" style="right: 1px">
                <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span></button>
                <ul role="menu" class="dropdown-menu dropdown-menu-right">
                    <li class="J_tabShowActive"><a>定位当前选项卡</a>
                    </li>
                    <li class="divider"></li>
                    <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
                    </li>
                    <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
                    </li>
                </ul>
            </div>
            <a href="/company/system/logout" class="roll-nav roll-right J_tabExit" style="display: none"><i class="fa fa fa-sign-out"></i> 退出</a>
        </div>

        <div class="iframes">
            <iframe id="cif100" src="/admin/index/welcome" style="background:#eee;"></iframe>
        </div>


    </div>
</div>
</body>
{/block}

{block name="script"}

<script>
    $(function()
    {
        let token = '{$token}';
        localStorage.setItem('tokenUser',token);
    })
    //刷新当前 页面  暂定 todo
    function bind(){
        $('body').find('.iframes iframe:visible')[0].contentWindow.bind();
    };
    
    //关闭当前 页面
    function closeTab() {
        $('body').find('.iframes iframe:visible')[0].contentWindow.oob.closeTab();
    }

    require(["jquery","layui"], function ($) {
        tabs = new pttab('.J_menuTabs');
        tabs.test();
        $(".nav-title").on('mouseover',function()
        {
            var text = $(this).text();
            if(text.length >12)
            {
                layer.tips(text,$(this));
            }
            else{
                layer.closeAll();
            }
        });
        $(".edit_index_user").on("click",function () {

            layer.open({
                title: '用户编辑', type: 2, area: ['800px', '500px'], fix: true, maxmin: false
                , content: '/admin/index/edit',
                yes:function (ee) {
                    console.log(ee);
                }

            });

        });
        $("#if100").on("load", function () {

            document.getElementById("if100").contentWindow.document.body.onclick=function(){
                $('.dropdown-toggle').parent().removeClass('open');
            }
            //layer.closeAll('loading');
        });
    });


</script>

{/block}
</html>